package com.wealth.sms.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.wealth.system.entity.Corporation;

/**
 * 短信验证记录
 * @author chan
 * modify by chan on 2016-08-16 短信接口升级
 */
@Entity
@Table(name="sms_message_record")
public class MessageRecord implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private Long id;
	private String mobile;
	private String content;
	private Date createTime;
	private Corporation corp;
	private String returnstatus; /**返回状态值 */
	private String message;	/**返回信息 */
	
	/* ---------------- method ----------------*/
	
	public MessageRecord() {}
	
	public MessageRecord(Long id){
		this.id = id;
	}
	
	/* ---------------- getter/setter ----------------*/
	
	public MessageRecord(String mobile, String content) {
		this.mobile = mobile;
		this.content = content;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
	@ManyToOne
	@JoinColumn(name="corp_id")
	public Corporation getCorp() {
		return corp;
	}

	public void setCorp(Corporation corp) {
		this.corp = corp;
	}

	@Column(name="mobile")
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	@Column(name="content")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name="create_time")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public String getReturnstatus() {
		return returnstatus;
	}

	public void setReturnstatus(String returnstatus) {
		this.returnstatus = returnstatus;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
	
}


